package net.xdclass.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
public class CouponVO {

    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "优惠卷类型[NEW_USER注册赠券，TASK任务卷，PROMOTION促销劵]")
    private String category;

    @ApiModelProperty(value = "优惠券图片")
    @JsonProperty("coupon_img")
    private String couponImg;

    @ApiModelProperty(value = "优惠券标题")
    @JsonProperty("coupon_title")
    private String couponTitle;

    @ApiModelProperty(value = "抵扣价格")
    private BigDecimal price;

    @ApiModelProperty(value = "每人限制张数")
    @JsonProperty("user_limit")
    private Integer userLimit;

    @ApiModelProperty(value = "优惠券开始有效时间")
    @JsonProperty("start_time")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", locale = "zh", timezone = "GMT+8")
    private LocalDateTime startTime;

    @ApiModelProperty(value = "优惠券失效时间")
    @JsonProperty("end_time")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", locale = "zh", timezone = "GMT+8")
    private LocalDateTime endTime;

    @ApiModelProperty(value = "优惠券总量")
    @JsonProperty("publish_count")
    private Integer publishCount;

    @ApiModelProperty(value = "库存")
    private Integer stock;

    @ApiModelProperty(value = "满多少才可以使用")
    @JsonProperty("condition_price")
    private BigDecimal conditionPrice;
}
